console.log('main.js start');
let worker = new Worker('./js/worker.js');

let num = 1000;
worker.postMessage(num);

worker.onmessage = function (event) {
  console.log(`result: ${event.data}`);
};